﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TimViec
{
    public partial class NewDetailNTD : System.Web.UI.Page
    {
        public int bvid { get; set; }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["id"] != null)
            {
                bvid = int.Parse(Request.QueryString["id"]);
            }
            if (!IsPostBack)
            {
                LoadData();
            }
        }
        public void LoadData()
        {
            DAL.tbl_Article bv = BLL.ArticleHelper.Get_ArticleId(bvid);
            if (bv != null)
            {
                lbTitle.Text = bv.ArticleName;
                lbNoiDung.Text = bv.ArticleContent;
                img_bv.ImageUrl = bv.Images;
                //
                rptTop2.DataSource = BLL.ArticleHelper.List_TinLienQuan(bvid, bv.Value_config, 0, 2);
                rptTop2.DataBind();
                //
                rptTinKhac.DataSource = BLL.ArticleHelper.List_TinLienQuan(bvid, bv.Value_config, 2, 18);
                rptTinKhac.DataBind();                
            }
        }
    }
}